home *** CD-ROM | disk | FTP | other *** search
Winamp Compiled Maki Script | 2003-11-17 | 11.3 KB | 520 lines |
- /* Note: a decompiler is no invitation to steal code.
- Please respect the the copyright */
-
- #include "std.mi"
- Global ConfigAttribute ConfigAttribute3;
- Global ConfigAttribute ConfigAttribute4;
- Global ConfigAttribute ConfigAttribute5;
- Global ConfigAttribute ConfigAttribute6;
- Global ConfigAttribute ConfigAttribute7;
- Global ConfigAttribute ConfigAttribute8;
- Global ConfigAttribute ConfigAttribute9;
- Global ConfigAttribute ConfigAttribute10;
- Global ConfigAttribute ConfigAttribute11;
- Global ConfigAttribute ConfigAttribute12;
- Global ConfigAttribute ConfigAttribute13;
- Global ConfigAttribute ConfigAttribute14;
- Global ConfigAttribute ConfigAttribute15;
- Global ConfigAttribute ConfigAttribute16;
- Global ConfigAttribute ConfigAttribute17;
- Global ConfigAttribute ConfigAttribute18;
- Global ConfigAttribute ConfigAttribute19;
- Global ConfigAttribute ConfigAttribute20;
- Global ConfigAttribute ConfigAttribute21;
- Global ConfigAttribute ConfigAttribute22;
- Global ConfigAttribute ConfigAttribute23;
- Global ConfigAttribute ConfigAttribute24;
- Global ConfigAttribute ConfigAttribute25;
- Global ConfigAttribute ConfigAttribute26;
- Global ConfigAttribute ConfigAttribute27;
- Global ConfigAttribute ConfigAttribute28;
- Global ConfigAttribute ConfigAttribute29;
- Global Container Container103;
- Global Layout Layout104;
- Global Timer Timer105;
- Global String String106;
-
- Function func0();
- Function func1855();
- Function func2100(Int 0);
- Function func2651();
- Function func2692();
- Function func2861(Int 0);
- Function func3229(String "0");
- Function func4586(String "0");
-
- func0()
- {
- ConfigItem ConfigItem47;
- ConfigAttribute ConfigAttribute65;
- ConfigAttribute ConfigAttribute61;
- ConfigAttribute ConfigAttribute60;
- ConfigItem ConfigItem32;
- ConfigAttribute ConfigAttribute64;
- ConfigAttribute ConfigAttribute59;
- ConfigItem ConfigItem50;
- ConfigItem ConfigItem55;
- ConfigItem ConfigItem57;
- ConfigAttribute ConfigAttribute71;
- ConfigItem ConfigItem53;
- ConfigItem ConfigItem41;
- ConfigAttribute ConfigAttribute62;
- ConfigItem ConfigItem38;
- ConfigItem ConfigItem44;
- ConfigAttribute ConfigAttribute66;
- ConfigItem ConfigItem35;
- ConfigItem32 = Config.newItem(( "Winamp\ Modern"), ( "\{26E26319\-AECA\-4433\-B8F1\-F4A5BF2A9ED5\}"));
- ConfigItem35 = Config.newItem(( "Drawers"), ( "\{C338B30F\-2A04\-4b10\-871F\-4E9D52D62806\}"));
- ConfigItem38 = Config.newItem(( "Menus"), ( "\{12ED320E\-6813\-45ac\-9F8E\-78EE5B2B5F6D\}"));
- ConfigItem41 = Config.newItem(( "Main\ Windowshade\ Mode"), ( "\{58F07E21\-AE96\-4899\-B7BC\-3640B40029FB\}"));
- ConfigItem44 = Config.newItem(( "Vis\ Buttons"), ( "\{D70E3ABF\-D2FF\-4b82\-9A70\-4B5DF1A5D942\}"));
- ConfigItem47 = Config.newItem(( "Notifications"), ( "\{1AB968B3\-8687\-4a35\-BA70\-FCF6D92FB57F\}"));
- ConfigItem50 = Config.newItem(( "Songticker"), ( "\{7061FDE0\-0E12\-11D8\-BB41\-0050DA442EF3\}"));
- ConfigItem53 = Config.newItem(( "Hidden"), ( "\{E9C2D926\-53CA\-400f\-9A4D\-85E31755A4CF\}"));
- ConfigItem55 = Config.getItem(( "\{1828D28F\-78DD\-4647\-8532\-EBA504B8FC04\}"));
- ConfigItem57 = Config.getItem(( "\{6559CA61\-7EB2\-4415\-A8A9\-A2AEEF762B7F\}"));
- ConfigAttribute59 = ConfigItem55.newAttribute(( "Winamp\ Modern"), ( ""));
- ConfigAttribute59.setData(( "\{26E26319\-AECA\-4433\-B8F1\-F4A5BF2A9ED5\}"));
- ConfigAttribute60 = ConfigItem32.newAttribute(( "Drawers"), ( ""));
- ConfigAttribute60.setData(( "\{C338B30F\-2A04\-4b10\-871F\-4E9D52D62806\}"));
- ConfigAttribute61 = ConfigItem32.newAttribute(( "Menus"), ( ""));
- ConfigAttribute61.setData(( "\{12ED320E\-6813\-45ac\-9F8E\-78EE5B2B5F6D\}"));
- ConfigAttribute62 = ConfigItem32.newAttribute(( "Main\ Windowshade\ Mode"), ( ""));
- ConfigAttribute62.setData(( "\{58F07E21\-AE96\-4899\-B7BC\-3640B40029FB\}"));
- ConfigAttribute64 = ConfigItem32.newAttribute(( "Vis\ Shortcut\ Button"), ( ""));
- ConfigAttribute64.setData(( "\{D70E3ABF\-D2FF\-4b82\-9A70\-4B5DF1A5D942\}"));
- ConfigAttribute65 = ConfigItem32.newAttribute(( "Notifications"), ( ""));
- ConfigAttribute65.setData(( "\{1AB968B3\-8687\-4a35\-BA70\-FCF6D92FB57F\}"));
- ConfigAttribute66 = ConfigItem32.newAttribute(( "Songticker"), ( ""));
- ConfigAttribute66.setData(( "\{7061FDE0\-0E12\-11D8\-BB41\-0050DA442EF3\}"));
- ConfigAttribute3 = ConfigItem35.newAttribute(( "Animate\ Video\/Vis\ Drawer\ \(disabled\ if\ opacity\ \<\ 100\%\)"), ( "0"));
- ConfigAttribute4 = ConfigItem35.newAttribute(( "Animate\ Config\ Drawer"), ( "0"));
- ConfigAttribute71 = ConfigItem35.newAttribute(( "sep1"), ( ""));
- ConfigAttribute71.setData(( "\-"));
- ConfigAttribute7 = ConfigItem35.newAttribute(( "Open\ Video\/Vis\ from\ the\ top"), ( "0"));
- ConfigAttribute8 = ConfigItem35.newAttribute(( "Open\ Video\/Vis\ from\ the\ bottom"), ( "1"));
- ConfigAttribute9 = ConfigItem35.newAttribute(( "Bypass\ setting\ to\ keep\ in\ screen"), ( "1"));
- if(( ConfigAttribute7.getData() == ( "1"))) {
- ConfigAttribute7.onDataChanged();
- } else {
- ConfigAttribute8.onDataChanged();
- }
- ConfigAttribute11 = ConfigItem38.newAttribute(( "Show\ Menus\ in\ Main\ Window"), ( "1"));
- ConfigAttribute12 = ConfigItem38.newAttribute(( "Show\ Menus\ in\ Playlist\ Editor"), ( "1"));
- ConfigAttribute13 = ConfigItem38.newAttribute(( "Show\ Menus\ in\ Media\ Library"), ( "1"));
- ConfigAttribute71 = ConfigItem32.newAttribute(( "sep1"), ( ""));
- ConfigAttribute71.setData(( "\-"));
- ConfigAttribute5 = ConfigItem32.newAttribute(( "Detach\ Vis\ Window"), ( "0"));
- ConfigAttribute6 = ConfigItem32.newAttribute(( "Detach\ Video\ Window"), ( "0"));
- ConfigAttribute10 = ConfigItem57.newAttribute(( "Equalizer\ Alt\+G"), ( "0"));
- ConfigAttribute71 = ConfigItem32.newAttribute(( "sep2"), ( ""));
- ConfigAttribute71.setData(( "\-"));
- ConfigAttribute17 = ConfigItem32.newAttribute(( "Enable\ Beat\ Visualization"), ( "1"));
- ConfigAttribute14 = ConfigItem41.newAttribute(( "Link\ Position\ and\ Width"), ( "1"));
- ConfigAttribute15 = ConfigItem41.newAttribute(( "Link\ Position\,\ Unlink\ Width"), ( "0"));
- ConfigAttribute16 = ConfigItem41.newAttribute(( "Unlink\ Position\ and\ Width"), ( "0"));
- ConfigAttribute19 = ConfigItem44.newAttribute(( "Open\ Context\ Menu"), ( "1"));
- ConfigAttribute18 = ConfigItem44.newAttribute(( "Open\ Configuration"), ( "0"));
- ConfigAttribute22 = ConfigItem47.newAttribute(( "Show\ always"), ( "0"));
- ConfigAttribute21 = ConfigItem47.newAttribute(( "Show\ with\ windowshade\ and\ when\ minimized"), ( "0"));
- ConfigAttribute20 = ConfigItem47.newAttribute(( "Show\ only\ when\ minimized"), ( "0"));
- ConfigAttribute23 = ConfigItem47.newAttribute(( "Never\ show"), ( "1"));
- ConfigAttribute71 = ConfigItem47.newAttribute(( "sep1"), ( ""));
- ConfigAttribute71.setData(( "\-"));
- ConfigAttribute27 = ConfigItem47.newAttribute(( "Disable\ in\ fullscreen"), ( "1"));
- ConfigAttribute24 = ConfigItem53.newAttribute(( "Notifications\ fade\ in\ time"), ( "1000"));
- ConfigAttribute25 = ConfigItem53.newAttribute(( "Notifications\ fade\ out\ time"), ( "5000"));
- ConfigAttribute26 = ConfigItem53.newAttribute(( "Notifications\ display\ time"), ( "2000"));
- ConfigAttribute28 = ConfigItem50.newAttribute(( "Enable\ Songticker\ scrolling"), ( "1"));
- ConfigAttribute29 = ConfigItem50.newAttribute(( "Disable\ Songticker\ scrolling"), ( "0"));
- return Null;
- }
-
- System.onScriptLoaded()
- {
- func0();
- Timer105 = ( new Timer);
- return Null;
- }
-
- System.onScriptUnloading()
- {
- delete Timer105;
- return Null;
- }
-
- Int System.onShowNotification()
- {
- String String108;
- if(func2100(1)) {
- return Null;
- }
- func2692();
- if(( System.getStatus() == 1)) {
- String108 = ( "Playing");
- }
- if(( System.getStatus() == ( - 1))) {
- String108 = ( "Playback\ Paused");
- }
- if(( System.getStatus() == 0)) {
- String108 = ( "Playback\ Stopped");
- }
- func2861(func3229(String108));
- complete;
- return 1;
- }
-
- System.onTitleChange(String newtitle)
- {
- if(( String106 == newtitle)) {
- return Null;
- }
- if(( System.Strleft(newtitle, 1) == ( "\["))) {
- if(( ( System.Strleft(newtitle, 7) == ( "\[Buffer")) || ( System.Strleft(newtitle, 4) == ( "\[ICY")))) {
- return Null;
- }
- }
- String106 = newtitle;
- func1855();
- return Null;
- }
-
- func1855()
- {
- if(func2100(0)) {
- return Null;
- }
- func2692();
- func2861(func3229(( "")));
- return Null;
- }
-
- System.onPlay()
- {
- if(func2100(0)) {
- return Null;
- }
- func2692();
- func2861(func3229(( "Playing")));
- return Null;
- }
-
- System.onPause()
- {
- if(func2100(0)) {
- return Null;
- }
- func2692();
- func2861(func4586(( "Playback\ Paused")));
- return Null;
- }
-
- System.onResume()
- {
- if(func2100(0)) {
- return Null;
- }
- func2692();
- func2861(func3229(( "Resuming\ Playback")));
- return Null;
- }
-
- System.onStop()
- {
- if(func2100(0)) {
- return Null;
- }
- func2692();
- func2861(func4586(( "End\ of\ Playback")));
- return Null;
- }
-
- func2100(Int 0)
- {
- Container Container123;
- Layout Layout124;
- if(( ( ( ! Int121) && ( ConfigAttribute27.getData() == ( "1"))) && System.isVideoFullscreen())) {
- return 1;
- }
- if(( ConfigAttribute23.getData() == ( "1"))) {
- return 1;
- }
- if(( ( ConfigAttribute20.getData() == ( "1")) && ( ! System.isMinimized()))) {
- return 1;
- }
- if(( ConfigAttribute21.getData() == ( "1"))) {
- if(System.isMinimized()) {
- return 0;
- }
- Container123 = System.getContainer(( "main"));
- if(( ! Container123)) {
- return 1;
- }
- Layout124 = Container123.getCurLayout();
- if(( ! Layout124)) {
- return 1;
- }
- if(( Layout124.getId() != ( "shade"))) {
- return 1;
- }
- }
- return 0;
- }
-
- Layout104.onTargetReached()
- {
- Int Int126;
- Int126 = Layout104.getAlpha();
- if(( Int126 == 255)) {
- Timer105.setDelay(System.StringToInteger(ConfigAttribute26.getData()));
- Timer105.start();
- } else {
- if(( Int126 == 0)) {
- func2651();
- }
- }
- return Null;
- }
-
- Timer105.onTimer()
- {
- Timer105.stop();
- if(Layout104.isTransparencySafe()) {
- Layout104.setTargetA(0);
- Layout104.setTargetSpeed(( System.StringToInteger(ConfigAttribute25.getData()) / 1000));
- Layout104.gotoTarget();
- } else {
- func2651();
- }
- return Null;
- }
-
- Layout104.onLeftButtonDown(int x, int y)
- {
- Timer105.stop();
- Layout104.cancelTarget();
- func2651();
- System.restoreApplication();
- System.activateApplication();
- return Null;
- }
-
- func2651()
- {
- Container103.close();
- Container103 = Null;
- Layout104 = Null;
- return Null;
- }
-
- func2692()
- {
- if(( Container103 == Null)) {
- Container103 = System.newDynamicContainer(( "notifier"));
- if(( ! Container103)) {
- return Null;
- }
- if(System.isDesktopAlphaAvailable()) {
- Layout104 = Container103.getLayout(( "desktopalpha"));
- } else {
- Layout104 = Container103.getLayout(( "normal"));
- }
- if(( ! Layout104)) {
- return Null;
- }
- } else {
- Layout104.cancelTarget();
- Timer105.stop();
- }
- return Null;
- }
-
- func2861(Int 0)
- {
- Int Int139;
- Int Int137;
- Int134 = ( Int134 + 32);
- Int137 = ( ( ( System.getViewportWidth() + System.getViewportLeft()) - Int134) - 2);
- Int139 = ( ( ( System.getViewportHeight() + System.getViewportTop()) - 80) - 2);
- Layout104.resize(Int137, Int139, Int134, 80);
- if(Layout104.isTransparencySafe()) {
- Layout104.show();
- Layout104.setTargetA(255);
- Layout104.setTargetX(Int137);
- Layout104.setTargetY(Int139);
- Layout104.setTargetW(Int134);
- Layout104.setTargetH(80);
- Layout104.setTargetSpeed(( System.StringToInteger(ConfigAttribute24.getData()) / 1000));
- Layout104.gotoTarget();
- } else {
- Layout104.setAlpha(255);
- Layout104.show();
- Timer105.setDelay(System.StringToInteger(ConfigAttribute26.getData()));
- Timer105.start();
- }
- return Null;
- }
-
- func3229(String "0")
- {
- Text Text145;
- Int Int142;
- Group Group143;
- Text Text155;
- Text Text153;
- String String174;
- Text Text147;
- Text Text151;
- String String166;
- Int Int141;
- String String162;
- String String172;
- Text Text149;
- Int141 = 0;
- Int142 = 0;
- Group143 = Layout104;
- Text145 = Group143.findObject(( "plentry"));
- Text147 = Group143.findObject(( "nexttrack"));
- Text149 = Group143.findObject(( "title"));
- Text151 = Group143.findObject(( "album"));
- Text153 = Group143.findObject(( "artist"));
- Text155 = Group143.findObject(( "endofplayback"));
- System.debugString(( ( "got\ callback\ for\ ") + System.getPlayItemString()), 0);
- if(( System.Strleft(System.getPlayItemString(), 7) == ( "http\:\/\/"))) {
- Int142 = 1;
- }
- if(Text155) {
- Text155.hide();
- }
- if(Text145) {
- Text145.setText(( ( System.integerToString(( System.getPlaylistIndex() + 1)) + ( "\/")) + System.integerToString(System.getPlaylistLength())));
- Text145.show();
- }
- if(Text147) {
- if(( String140 == ( ""))) {
- if(( ! Int142)) {
- if(( ! System.isVideo())) {
- Text147.setText(( "New\ track"));
- } else {
- Text147.setText(( "New\ video"));
- }
- } else {
- Text147.setText(( "On\ air"));
- }
- } else {
- Text147.setText(String140);
- }
- Text147.show();
- }
- if(Text149) {
- if(( ! Int142)) {
- Text149.setXmlParam(( "ticker"), ( "0"));
- Text149.setXmlParam(( "display"), ( ""));
- String162 = System.getPlayItemMetaDataString(( "title"));
- if(( String162 == ( ""))) {
- String162 = System.getPlayItemDisplayTitle();
- }
- String166 = System.getPlayItemMetaDataString(( "length"));
- if(( String166 != ( ""))) {
- String162 = ( String162 + ( ( ( "\ \(") + System.integerToTime(System.StringToInteger(String166))) + ( "\)")));
- }
- Text149.setText(String162);
- } else {
- Text149.setXmlParam(( "ticker"), ( "1"));
- Text149.setXmlParam(( "display"), ( "songtitle"));
- Text149.setText(( ""));
- }
- Text149.show();
- }
- if(Text153) {
- if(( ! Int142)) {
- if(System.isVideo()) {
- Text153.setText(( ""));
- } else {
- Text153.setText(System.getPlayItemMetaDataString(( "artist")));
- }
- } else {
- if(System.isVideo()) {
- Text153.setText(( "Internet\ TV"));
- } else {
- Text153.setText(( "Internet\ Radio"));
- }
- }
- Text153.show();
- }
- if(Text151) {
- if(( ( ! Int142) && ( ! System.isVideo()))) {
- Text151.setXmlParam(( "display"), ( ""));
- String172 = System.getPlayItemMetaDataString(( "album"));
- String174 = System.getPlayItemMetaDataString(( "track"));
- if(( ( String174 != ( "")) && ( String174 != ( "\-1")))) {
- String172 = ( String172 + ( ( ( "\ \(Track\ ") + String174) + ( "\)")));
- }
- Text151.setText(String172);
- } else {
- Text151.setText(( ""));
- Text151.setXmlParam(( "display"), ( "songinfo"));
- }
- Text151.show();
- }
- Int141 = Text153.getAutoWidth();
- if(( Int141 > Text151.getAutoWidth())) {
- Int141 = Text151.getAutoWidth();
- }
- if(( Int141 > Text149.getAutoWidth())) {
- Int141 = Text149.getAutoWidth();
- }
- if(( Int141 > 128)) {
- Int141 = 128;
- }
- if(( Int141 < ( System.getViewportWidth() / 4))) {
- Int141 = ( System.getViewportWidth() / 4);
- }
- return Int141;
- }
-
- func4586(String "0")
- {
- Text Text181;
- Int Int187;
- Text Text186;
- Group Group180;
- Text Text185;
- Text Text182;
- Text Text184;
- Text Text183;
- Group180 = Layout104;
- Text181 = Group180.findObject(( "plentry"));
- Text182 = Group180.findObject(( "nexttrack"));
- Text183 = Group180.findObject(( "title"));
- Text184 = Group180.findObject(( "album"));
- Text185 = Group180.findObject(( "artist"));
- Text186 = Group180.findObject(( "endofplayback"));
- if(Text181) {
- Text181.hide();
- }
- if(Text182) {
- Text182.hide();
- }
- if(Text183) {
- Text183.hide();
- }
- if(Text185) {
- Text185.hide();
- }
- if(Text184) {
- Text184.hide();
- }
- if(Text186) {
- Text186.setText(String179);
- Int187 = Text186.getAutoWidth();
- Text186.show();
- if(( Int187 < 128)) {
- return Int187;
- }
- }
- return 128;
- }
-
-
-